import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { NgZorroAntdModule } from 'ng-zorro-antd';
import { CustomFormsModule } from 'ng2-validation';

// share component
import { MonitorWarningTipComponent } from './components/monitor-warning-tip/monitor-warning-tip.component';
import { TabListComponent } from './components/tab-list/tab-list.component';
import { OverviewComponent } from './components/overview/overview.component';

// share pipe
import { NoDataPipe } from './pipes/no-data.pipe';
import { TextEllipsisPipe } from './pipes/text-ellipsis.pipe';

// share directive
import { SZAclDirective } from '../core/auth/acl.directive';
import { BreadcrumbComponent } from './components/breadcrumb/breadcrumb.component';


const SHARECOMPONENT = [
  MonitorWarningTipComponent,
  TabListComponent,
  OverviewComponent,
  BreadcrumbComponent,
];


@NgModule({
  declarations: [
    ...SHARECOMPONENT,
    SZAclDirective,
    NoDataPipe,
    TextEllipsisPipe,

  ],
  entryComponents: [
    MonitorWarningTipComponent,
    OverviewComponent
  ],
  imports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    RouterModule,
    NgZorroAntdModule,
    CustomFormsModule
  ],
  providers: [],
  exports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    RouterModule,
    NgZorroAntdModule,
    CustomFormsModule,
    ...SHARECOMPONENT,
    SZAclDirective,
    NoDataPipe,
    TextEllipsisPipe
  ]
})
export class SharedModule { }
